			
	




	******************************************************************
	**
	**
	**		NAME:	ELITE PERSISTENCE IN THE ERA OF EXPANDING OVERSEAS TRADE
	**
	**		MAKES:  Appendix G Table G1	       
	**		
	**
	******************************************************************
	
	
	
	
	

			

		
			**	**	**	**	**	**	**	**	**	**	**	**	**
			**	**	**	**	**	**	**	**	**	**	**	**	**
			**	**	**	**	**	**	**	**	**	**	**	**	**
	


*-------------------------------------------------------------------------------
* global for input/output
*-------------------------------------------------------------------------------


* input
*------

global input = "" 





			**	**	**	**	**	**	**	**	**	**	**	**	**
			**	**	**	**	**	**	**	**	**	**	**	**	**
			**	**	**	**	**	**	**	**	**	**	**	**	**
	


*-------------------------------------------------------------------------------
* data
*-------------------------------------------------------------------------------



* use data
*---------

cd ${input}
use  analysis_vars_indivs.dta, clear







			**	**	**	**	**	**	**	**	**	**	**	**	**
			**	**	**	**	**	**	**	**	**	**	**	**	**
			**	**	**	**	**	**	**	**	**	**	**	**	**
	


*-------------------------------------------------------------------------------
* assert
*-------------------------------------------------------------------------------


* assert
*-------

assert 	parl_year >= 1536 & parl_year <= 1760
assert 	!(parl_year >= 1640 & parl_year < 1660)




			**	**	**	**	**	**	**	**	**	**	**	**	**
			**	**	**	**	**	**	**	**	**	**	**	**	**
			**	**	**	**	**	**	**	**	**	**	**	**	**
	


*-------------------------------------------------------------------------------
* activity in parliament (TABLE G1)
*-------------------------------------------------------------------------------



* output directory
*-----------------

cd "${output}"

_eststo clear





* labels
*-------

label var indiv_parlyr_min_overall 		"Earliest year returned" 
label var dynas_county 					"Dynastic"
label var fam_any_aris 					"Aristocratic family"
label var ln_group_pre1550_nation 		"Pre-1550 family" 
label var year_born  					"Age at first parliament"
label var constit_count_bymp			"Number of constituencies"
label var int_commtot_1					"Commercial (all)"
label var int_intl_newworld				"American merchant "
label var int_intl_east					"Asia merchant"




* globals
*--------

global dv1 			= "inactive_i"

global comm1 		= "int_commtot_1"
global comm2 		= "int_intl_newworld"
global comm3 		= "int_intl_east"

global regressors	= "indiv_parlyr_min_overall  dynas_county fam_any_aris ln_group_pre1550_nation  year_born  constit_count_bymp"

global yearsample 	= "((parl_year >= 1550 & parl_year < 1640) | (parl_year >= 1660 & parl_year <= 1750))"

global filename 	= "activity"




* regressions
*------------


eststo est_1: reg  ${dv1} ${comm1} ${regressors}   if ${yearsample} & age_firstparl >= 13, vce(robust)

					sum ${dv1} if ${yearsample} & age_firstparl >= 13
					estadd scalar meandv = `r(mean)': est_1
					estadd scalar stddv = `r(sd)': est_1
					
					
eststo est_2: reg  ${dv1} ${comm2} ${regressors}   if ${yearsample} & age_firstparl >= 13, vce(robust)

					sum ${dv1} if ${yearsample} & age_firstparl >= 13
					estadd scalar meandv = `r(mean)': est_2
					estadd scalar stddv = `r(sd)': est_2
					
					
eststo est_3: reg  ${dv1} ${comm3} ${regressors}   if ${yearsample} & age_firstparl >= 13, vce(robust)

					sum ${dv1} if ${yearsample} & age_firstparl >= 13
					estadd scalar meandv = `r(mean)': est_3
					estadd scalar stddv = `r(sd)': est_3




	* output the regressions
	*-----------------------   

	cd "${output}"

	#delimit;
	
	esttab 
	
		est_1
		est_2	
		est_3

		
		
		using "${filename}.tex",  
			b(a2) label replace nogaps compress se(a2) bookt 
			noconstant nodepvars star(* 0.1 ** 0.05 *** 0.01)
			fragment  substitute(\_ _)
			order( ${comm1} ${comm2} ${comm3} ${regressors} )
			
			
			stats(		N 
						meandv
						stddv
 
						, 
						
				labels(	"Obsv." 
						"Mean of DV"
						"SD of DV"
						
						) 
					)
			title("")
			nomtitles
			
		;
		
	#delimit cr		
	
	
	
	

			**	**	**	**	**	**	**	**	**	**	**	**	**
			**	**	**	**	**	**	**	**	**	**	**	**	**
			**	**	**	**	**	**	**	**	**	**	**	**	**
	
						** end of do file ** 
